package modelo;

import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

import sun.misc.BASE64Encoder;

@Entity
@NamedQueries({
		@NamedQuery(name = "Usuario.buscarTodos", query = "SELECT u FROM Usuario u "),
		@NamedQuery(name = "Usuario.buscarPorEmailSenha", query = "SELECT u FROM Usuario u WHERE u.login = :login AND u.senha = :senha") })
public class Usuario {

	@Id
	@GeneratedValue
	private long idUsuario;
	@Column(length = 100, nullable = false)
	private String nome;
	@Column(length = 100, nullable = false)
	private String login;
	@Column(length = 100, nullable = false)
	private String senha;

	public long getIdUsuario() {
		return idUsuario;
	}

	public void setIdUsuario(long idUsuario) {
		this.idUsuario = idUsuario;
	}

	public String getNome() {
		return nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getSenha() {
		return senha;
	}

	public void setSenha(String senha) {
		this.senha = senha;
	}

	

	public Usuario() {
		// TODO Auto-generated constructor stub
	}
}
